<template>
  <basic-container>
    <avue-crud v-bind="bindVal" v-on="onEvent" v-model="form" :permission="permissionList" :page.sync="page">
      <template slot="menuLeft">
        <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.param_delete" plain @click="handleDelete">删 除 </el-button>
      </template>
      <!--      <template slot="menuRight">-->
      <!--        <user-table-config :option="option" @confirm="(val) => handleSetUserConfig(val, pageCode)"></user-table-config>-->
      <!--      </template>-->
    </avue-crud>
  </basic-container>
</template>

<script>
import userTableConfig from '@/components/user-table-config';
import userConfig from '@/mixins/userConfig';

export default window.$crudCommon(
  {
    name: 'SystemParam',
    components: {
      userTableConfig
    },
    mixins: [userConfig()],
    data() {
      return {
        pageCode: 'PARAM'
      };
    },
    computed: {
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.param_add, false),
          viewBtn: this.vaildData(this.permission.param_view, false),
          delBtn: this.vaildData(this.permission.param_delete, false),
          editBtn: this.vaildData(this.permission.param_edit, false)
        };
      }
    },
    mounted() {
      this.$nextTick(() => {
        this.$structuralSplit();
      });
    },
    methods: {}
  },
  {
    //模块路径
    name: 'system/param'
  }
);
</script>

<style></style>
